package com.dupf.product.common.constant;

/**
 * product系统接口结果常量枚举类
 * Created by dupf on 2018/3/1.
 */
public enum ProductResultConstant {

    /**
     * 失败
     */
    FAILED(0, "failed"),

    /**
     * 成功
     */
    SUCCESS(1, "success"),

    /**
     * 文件类型不支持
     */
    FILE_TYPE_ERROR(20001, "File type not supported!"),

    /**
     * 无效长度
     */
    INVALID_LENGTH(20002, "Invalid length"),

    /**
     * 无效参数
     */
    INVALID_PARAMETER(20003, "Invalid parameter"),

    /**
     * 已存在
     */
    EXISTED(50001, "existed"),

    /**
     * 不存在
     */
    NOT_EXISTED(50002, "not existed"),

    /**
     * 不支持
     */
    NOT_SUPPORT(50003, "not supported"),

    /**
     * 数据量大
     */
    OVER_LIMIT_DATA(50004, "over limit data"),

    /**
     * 采集地址与目标地址不一致
     */
    SOURCE_URL_NOT_MATCH(50006, "collect url not match content"),

    /**
     * 该地址已采集
     */
    SOURCE_URL_EXISTED(50007, "target url Collected");


    public int code;

    public String message;

    ProductResultConstant(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

}
